﻿using ConsoleApp9;

// See https://aka.ms/new-console-template for more information
TimeSpan executionTime = new TimeSpan(12, 10, 0);

List<string> weeklyDay = new List<string> { "1", "2", "4", "16" };
List<int> weeklyDays = weeklyDay.Select(item => int.Parse(item)).ToList();

var now = DateTime.Parse("2024-07-16 12:20:00"); // Saturday
var ss = ConsoleApp9.TaskScheduler.GetLastMonthDayExecutionTime(now, weeklyDays, executionTime);


ss = ConsoleApp9.TaskScheduler.GetLastDayExecutionTime(now, executionTime);
Console.WriteLine();